#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "global.h"

#define ABS(x) ((x) < (0) ? -(x) : (x))

typedef struct
{
  short x;
  short y;
} mb_info_t;

typedef struct orientation_t
{
  FILE *fn;
  unsigned int frm_width;
  unsigned int frm_height;
  unsigned int frm_stride;
  unsigned int frmWinLCU;
  unsigned int frmHinLCU;
  unsigned int search_range;
  unsigned int merge_size;
  unsigned int mb_width;
  unsigned int mb_height;    
  unsigned int mv_info_width;
  unsigned int mv_info_height;
  unsigned int mv_info_stride;  
  mb_info_t *curr_mb_info;
  unsigned int *block_motion;
  unsigned int *lcu_motion;
  unsigned int PoleMV;
  unsigned int MinMV;
  int MinMV_roll;
  int MinMV_yaw;
} orientation_t;